package com.monkeybrother.responsibility;

/**
 * @Desc
 * @Author houruiyang
 * @Date 2021/8/9
 **/
public class FirstPassHandler extends AbstractHandler{

    private int pay() {
        return 80;
    }

    @Override
    public int handler() {
        System.out.println("第一关");
        int score = pay();
        if (score >= 80) {
            if (this.next != null) {
                return this.next.handler();
            }
        }
        return score;
    }
}
